﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SPVisualDev.VSAddin.Dialogs
{
    public partial class DialogElementSelector2 : Form
    {
        public DialogElementSelector2()
        {
            InitializeComponent();
        }

        public string[] SelectedElement
        {
            get
            {
                if (treeView.SelectedNode == null)
                    return null;

                string name = treeView.SelectedNode.FullPath;
                if (string.IsNullOrEmpty(name))
                    return null;

                string[] arr = name.Split('\\');

                if (arr.Length < 2)
                    return null;

                return arr;

            }
        }

    }
}
